#ifndef MOCHA_DETAIL_POINTERS_HPP_INCLUDED
#define MOCHA_DETAIL_POINTERS_HPP_INCLUDED

/**
 * @file Contains forward declarartions and pointer type declarations for commonly used objects, particularly reference counted objects. Types are created of the form *_ptr_t and const_*_ptr_t. Additionally, macros to create helper functions of the form new_*() are provided (only for default-constructible classes).
 */

#include <boost/shared_ptr.hpp>

#define MOCHA_PTR_DECL(X) class X ; typedef X * X##_ptr_t; typedef const X * const_##X##_ptr_t
#define MOCHA_PTR_ALIAS_DECL(X,Y) class X ; typedef X * Y##_ptr_t; typedef const X * const_##Y##_ptr_t
#define MOCHA_SHARED_PTR_DECL(X) class X ; typedef boost::shared_ptr< X > X##_ptr_t; typedef boost::shared_ptr<const X > const_##X##_ptr_t; typedef boost::weak_ptr< X > X##_weak_ptr_t; typedef boost::weak_ptr<const X > const_##X##_weak_ptr_t
#define MOCHA_SHARED_PTR_ALIAS_DECL(X,Y) class X ; typedef boost::shared_ptr< X > Y##_ptr_t; typedef boost::shared_ptr<const X > const_##Y##_ptr_t; typedef boost::weak_ptr< X > Y##_weak_ptr_t; typedef boost::weak_ptr<const X > const_##Y##_weak_ptr_t

namespace mocha {
MOCHA_SHARED_PTR_DECL(event_queue);
MOCHA_SHARED_PTR_DECL(plugin_factory);
MOCHA_SHARED_PTR_DECL(shared_library);
namespace graphics {
MOCHA_SHARED_PTR_DECL(graphics);
MOCHA_SHARED_PTR_DECL(image);
MOCHA_SHARED_PTR_DECL(texture);
}
}

#endif

